<?php

namespace app\admin\model\yungift;

use addons\yungift\model\FundRecord;

/**
 * 礼币 - 账户
 */
class FundUser extends \addons\yungift\model\FundUser
{
    // 自定义初始化
    protected static function init()
    {
        FundUser::event('after_delete', function ($record) {
            FundRecord::destroy(['activity_id' => $record->activity_id, 'member_id' => $record->member_id]);
        });
    }
}
